package com.seata.demo.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

// AT模式和XA模式调用
@FeignClient(name = "account-service")
public interface AccountFeignClient {

    @PostMapping("/account/debit")
    void debit(@RequestParam("userId") String userId, 
              @RequestParam("money") BigDecimal money);
}
